package com.jiangyg.mall.product.dto;

import com.jiangyg.mall.core.support.validation.constraints.IntAnyValue;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 类描述：品牌
 *
 * @author jiangyg
 * @email email@jiangyg.com
 * @date 2021-10-30 07:38:49
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode
public class BrandDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 品牌id
     */
    private Long id;

    /**
     * 品牌名
     */
    @NotNull
    @Length(min = 2, max = 128)
    private String name;

    /**
     * 品牌logo地址
     */
    @NotNull
    @Length(min = 2, max = 1024)
    private String logo;

    /**
     * 排序
     */
    @NotNull
    private Integer sort;

    /**
     * 介绍
     */
    @Length(min = 2, max = 2048)
    private String desct;

    /**
     * 显示状态[0-不显示；1-显示]
     */
    @NotNull
    @IntAnyValue({0, 1})
    private Integer visible;

}
